package com.mk.admin.controller;

import com.mk.admin.model.ResultDto;
import com.mk.admin.model.query.DepartmentQuery;
import com.mk.admin.model.vo.DepartmentNumVo;
import com.mk.admin.model.vo.DepartmentVo;
import com.mk.admin.service.DepartmentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/a/adm/department")
@Api(tags = "科室")
public class DepartmentController {
    @Autowired
    private DepartmentService departmentService;

    @PostMapping("/select")
    @ApiOperation("本地科室查询")
    public ResultDto select(@RequestBody DepartmentQuery query) {
        return departmentService.select(query);
    }


    @PostMapping("/update")
    @ApiOperation("科室更新")
    public ResultDto update(@RequestBody DepartmentVo vo) {
        return departmentService.update(vo);
    }

    @PostMapping("/num")
    @ApiOperation("科室号源")
    public ResultDto num(@RequestBody DepartmentNumVo vo) {
        return departmentService.num(vo);
    }


}
